define(window.backboneCommon.getControllerDefine("Campaign"), function (require,Model,ModelBaseData,ModelCustomer,ModelReport) {
    var model=new Model();
    var modelBaseData=new ModelBaseData();
    var modelCustomer=new ModelCustomer();
    var modelReport=new ModelReport();
    return Backbone.Collection.extend({
        model:  model,
        initialize: function () {
            model.set({modelBaseData:modelBaseData});
            model.set({modelCustomer:modelCustomer});
            model.set({modelReport:modelReport});
        },
        getPageList:function(param){
            model.getPageList(param);
        },
        getCustomer:function () {
            modelCustomer.getAllList();
        },
        getInfo:function (id) {
            model.getInfo(id);
        },
        saveInfo:function (json) {
            json.id ? model.updateInfo(json) : model.addInfo(json);
        },
        initDetailAfter:function(){
            modelBaseData.getDeliveryTimeType();
        },
        getResourceType:function (id) {
            modelBaseData.getResourceType(id);
        },
        getReport:function (type,param) {
            switch(type){
                case "hour":
                    modelReport.getListHourByCampaign(param);
                    break;
                case "day":
                    modelReport.getListDayByCampaign(param);
                    break;
            }
        }
    });
});